/**   
 * @Title: PackageService.java 
 * @author 7828wc   
 * @date 2015年8月10日 下午5:22:10 
 */
package com.onstar.cn.api;

import com.onstar.cn.api.framework.ClazzInjectUtils;
import com.onstar.cn.api.framework.annotation.Path;
import com.onstar.cn.api.framework.annotation.PathParams;
import com.onstar.cn.api.framework.annotation.RequestMapping;
import com.onstar.cn.framework.network.entity.RequestEntity;

/**
 * @ClassName: PackageService
 * @Description: Renew Package and prepaid card Service
 * @author 7828wc
 * @date 2015年8月10日 下午5:22:10
 */
@Path("/msp/api/v3/user")
public class PackageService {
	private String serverURL;

	/**
	 * @author 7828wc
	 * @date 2015年09月08日
	 */
	public PackageService(String serverURL) {
		this.serverURL = serverURL;
	}

	@RequestMapping("/subscriber/{subscriberID}/accounts/{accountID}/vehicles/{vin}/packages/on_board_days")
	public RequestEntity onBardDays(@PathParams(value = "subscriberID") String subscriberID,
			@PathParams(value = "accountID") String accountID, @PathParams("vin") String vin,
			RequestEntity requestEntity) {
		if (requestEntity == null) {
			requestEntity = new RequestEntity();
		}
		String url = ClazzInjectUtils.injectUrl(getClass(), "onBardDays", subscriberID, accountID, vin, requestEntity);
		requestEntity.setUrl(serverURL + url);
		return requestEntity;
	}
}
